bin: Better handle --
authorJonathan Lebon <jonathan@jlebon.com>
Tue, 13 Aug 2019 19:05:09 +0000 (15:05 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 14 Aug 2019 12:31:10 +0000 (12:31 +0000)
commit0c48769de3965b9d62688f671e95267b3f40c998
tree1d13bea4094355721f36e03b80fe36984b863fe9
parentab73d9f5258a202d0c2a514688091be4db6622e0
bin: Better handle --

We would stop passing through `--` and args after it to the underlying
command in `ostree_run`. This made it impossible to use `--` to tell the
parser that following args starting with `-` really are positional.

AFAICT, that logic for `--` here came from a time when we parse options
manually in a big loop, in which case breaking out made sense (see
97558276e4f855442337be01abc8f90cf0dd1810).

There's an extra step here, which is that glib by default leaves the
`--` in the list of args, so we need to take care to remove it from the
list after parsing.

Closes: #1898
Closes: #1899
Approved by: rfairley
src/ostree/ot-main.c
tests/test-config.sh